Everything about Stream Control Transmission Protocol totally explained
In the field of
computer networking, the
IETF Signaling Transport (
SIGTRAN) working group defined the
Stream Control Transmission Protocol (SCTP) as a
transport layer protocol in 2000. RFC 4960 defines the protocol, with RFC 3286 providing an introductory text.
As a transport protocol, SCTP operates analogously to
TCP or
UDP. Indeed it provides some similar services as TCP—ensuring reliable, in-sequence transport of messages with congestion control. (In the absence of native SCTP support, it may sometimes be desirable to
tunnel SCTP over UDP
.)
Message-based multi-streaming
Whereas TCP transports a
byte-stream, SCTP can transport multiple message-streams. All bytes sent in a TCP connection must be delivered in that order, which requires that a byte transmitted first must safely arrive at the destination before a second byte can be processed even if the second byte manages to arrive first. If an arbitrary number of bytes are sent in one step and later some more bytes are sent, these bytes will be received in order, but the receiver can not distinguish which bytes were sent in which step. SCTP in contrast, conserves message boundaries by operating on whole messages instead of single bytes. That means if one message of several related bytes of information is sent in one step, exactly that message is received in one step.
The term "multi-streaming" refers to the capability of SCTP to transmit several independent streams of messages in parallel. For example, transmitting two images in an HTTP application in parallel over the same SCTP association. You might think of multi-streaming as bundling several TCP-connections in one SCTP-association operating with messages instead of bytes.
TCP ensures the correct order of bytes in the stream by conceptually assigning a sequence number to each byte sent and ordering these bytes based on that sequence number when they arrive. SCTP, on the other hand, assigns different sequence numbers to messages sent in a stream. This allows independent ordering of messages in different streams. However, message ordering is optional in SCTP. If the user application so desires, messages will be processed in the order they're received instead of the order they were sent, should these differ.
Signaling in
Public Switched Telephone Networks requires message-based delivery. Multi-Streaming also provides an advantage when used to transport PSTN services. If an SCTP connection is set up to carry, say, ten phone calls with one call per stream, then if a single message is lost in only one phone call, the other nine calls won't be affected. To handle ten phone calls in TCP, some form of
multiplexing would be required to put all ten phone calls into a single byte-stream. If a single packet for phone call #3 is lost then all packets after that couldn't be processed until the missing bytes are retransmitted, thus causing unnecessary delays in the other calls.
Benefits
Benefits of SCTP include:
- Multihoming support, where one (or both) endpoints of a connection can consist of more than one IP address, enabling transparent fail-over between redundant network paths.
- Delivery of data in chunks within independent streams - this eliminates unnecessary head-of-line blocking, as opposed to TCP byte-stream delivery.
- Path Selection and Monitoring - Selects a "primary" data transmission path and tests the connectivity of the transmission path.
- Validation and Acknowledgment mechanisms - Protects against flooding attacks and provides notification of duplicated or missing data chunks.
- Improved error detection suitable for jumbo Ethernet frames.
The designers of SCTP originally intended it for the transport of telephony (
SS7) protocols over
IP, with the goal of duplicating some of the reliability attributes of the SS7 signaling network in IP. This IETF effort is known as
SIGTRAN. In the meantime, other uses have been proposed, for example the
Diameter protocol and
Reliable server pooling ("RSerPool").
Motivations
Transmission Control Protocol (TCP) has provided the primary means to transfer data across the Internet in a reliable way.
However, TCP has imposed limitations on several applications.
From RFC 4960:
TCP provides both reliable data transfer and strict order-of- transmission delivery of data. Some applications need reliable transfer without sequence maintenance, while others would be satisfied with partial ordering of the data. In both of these cases, the head-of-line blocking offered by TCP causes unnecessary delay.
The stream-oriented nature of TCP is often an inconvenience. Applications must add their own record marking to delineate their messages, and must make explicit use of the push facility
to ensure that a complete message is transferred in a reasonable time.
The limited scope of TCP sockets complicates the task of providing highly-available data transfer capability using multi-homed hosts.
TCP is relatively vulnerable to denial-of-service attacks, such as SYN attacks.
All these limitations affect the performance of IP over
public switched telephone networks.
Comparison between transport layers
| Feature Name |
UDP |
TCP |
SCTP |
| Connection oriented |
No |
Yes |
Yes |
| Reliable transport |
|
|
|
| Preserve message boundary |
Yes |
No |
Yes |
| Ordered delivery |
No |
Yes |
Yes |
| Unordered delivery |
Yes |
No |
Yes |
| Data checksum |
|
|
|
| Checksum size (bits) |
16 |
16 |
32 |
| Path MTU |
No |
Yes |
Yes |
| Congestion control |
No |
Yes |
Yes |
| Multiple streams |
No |
No |
Yes |
| Multi-homing support |
|
|
|
| Bundling / Nagle |
No |
Yes |
Yes |
Implementations
The following
operating systems implement SCTP:
AIX Version 5
BSD with external patch at KAME project
Cisco IOS 12
DragonFly BSD since version 1.4
FreeBSD version 7
Linux 2.4/2.6
HP-UX
QNX Neutrino Realtime OS
Sun Solaris 10
Various third-party implementations implement SCTP for other operating systems.
FreeBSD is the reference implementation of SCTP.
Userspace library:
The SCTP library (sctplib
), with Windows XP port
Packet structure
| Bits |
Bits 0 - 7 |
8 - 15 |
16 - 23 |
24 - 31 |
Source port
| Destination port
|
Verification tag
Checksum
Chunk 1 type
| Chunk 1 flags |
Chunk 1 length
|
Chunk 1 data
| … | …
|
Chunk N type
| Chunk N flags |
Chunk N length
|
Chunk N data
|
SCTP packets have a simpler basic structure than TCP or UDP packets. Each consists of two basic sections:
The common header, which occupies the first 12 bytes and is highlighted in blue, and
The data chunks, which occupy the remaining portion of the packet. The first chunk is highlighted in green, and the last of N chunks (Chunk N) is highlighted in red.
Each chunk has a type identifier that's one byte long yielding, at most, 255 different chunk types. RFC 4960 defines a list of chunk types and there are currently 15 types defined. The remainder of the chunk is a two byte length (maximum size of 65,535 bytes) and the data. If the chunk doesn't form a multiple of 4 bytes (for example, the length isn't a multiple of 4) then it's implicitly padded with zeros which are not included in the chunk length.
Further Information
Get more info on 'Stream Control Transmission Protocol'.
|
External Link Exchanges
Do you know how hard it is to get a link from a large encyclopaedia? Well we're different and will prove it. To get a link from us just add the following HTML to your site on a relevant page:
<a href="http://stream_control_transmission_protocol.totallyexplained.com">Stream Control Transmission Protocol Totally Explained</a>
Then simply click through this link from your web page. Our crawlers will verify your link, extract the title of your web page and instantly add a link back to it. If you like you can remove the words Totally Explained and embed the link in article text.
As long as your link remains in place, we'll keep our link to you right here. Please play fair - our crawlers are watching. Your site must be closely related to this one's topic. Any kind of spamming, dubious practises or removing the link will result in your link from us being dropped and, potentially, your whole site being banned. |